package com.ssy.lingxi.order.model.vo.mobile.request;

import com.ssy.lingxi.order.handler.annotation.BuyerOrderShopTypeAnnotation;
import com.ssy.lingxi.order.handler.annotation.ManageShopEnvironmentAnnotation;
import com.ssy.lingxi.order.handler.annotation.OrderPayChannelAnnotation;
import com.ssy.lingxi.order.handler.annotation.OrderPayTypeAnnotation;
import com.ssy.lingxi.order.model.vo.basic.request.*;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * App - 创建B2B订单接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2021-09-26
 */
public class MobileBusinessOrderVO implements Serializable {
    private static final long serialVersionUID = 559509080610718010L;

    /**
     * 供应商会员Id
     */
    @NotNull(message = "供应商会员Id要大于0")
    @Positive(message = "供应商会员Id要大于0")
    private Long vendorMemberId;

    /**
     * 供应商会员角色Id
     */

    @NotNull(message = "供应商会员角色Id要大于0")
    @Positive(message = "供应商会员角色Id要大于0")
    private Long vendorRoleId;

    /**
     * 供应商会员名称
     */
    @NotBlank(message = "供应商会员名称不能为空")
    @Size(max = 200, message = "供应商会员名称最长200个字符")
    private String vendorMemberName;

    /**
     * 订单来源商城Id
     */
    @NotNull(message = "订单来源商城Id不能为空")
    private Long shopId;

    /**
     * 商城类型
     */
    @NotNull(message = "商城类型不能为空")
    @BuyerOrderShopTypeAnnotation
    private Integer shopType;

    /**
     * 商城环境
     */
    @NotNull
    @ManageShopEnvironmentAnnotation
    private Integer shopEnvironment;

    /**
     * 订单来源商城名称
     */
    @NotBlank(message = "订单来源商城名称不能为空")
    @Size(max = 50, message = "订单来源商城名称最长50个字符")
    private String shopName;

    /**
     * 支付方式
     */
    @NotNull(message = "支付方式不能为空")
    @OrderPayTypeAnnotation
    private Integer payType;

    /**
     * 支付渠道
     */
    @NotNull(message = "支付渠道不能为空")
    @OrderPayChannelAnnotation
    private Integer payChannel;

    /**
     * 订单摘要，如无订单摘要可为空
     */
    @Size(max = 100, message = "订单摘要最长100个字符")
    private String digest;

    /**
     * 报价单Id
     */
    @NotNull(message = "报价单Id要大于0")
    @Positive(message = "报价单Id要大于0")
    private Long quoteId;

    /**
     * 报价单号
     */
    @NotBlank(message = "报价单号不能为空")
    @Size(max = 20, message = "关联单号最长20个字符")
    private String quoteNo;

    /**
     * 运费
     */
    @NotNull(message = "运费金额要大于等于0")
    @PositiveOrZero(message = "运费金额要大于等于0")
    private BigDecimal freight;

    /**
     * 收货人信息
     */
    @Valid
    private OrderConsigneeVO consignee;

    /**
     * 发票信息，如不需要发票则不需要填写此字段
     */
    @Valid
    private OrderInvoiceVO invoice;

    /**
     * 合同信息，如订单没有合同不需要填写此字段
     */
    @Valid
    private OrderContractVO contract;

    /**
     * 商品列表
     */
    @NotEmpty(message = "商品列表不能为空")
    @Valid
    private List<BusinessOrderProductVO> products;

    /**
     * 订单送货时间列表
     */
    @Valid
    private List<BuyerOrderDeliverTimeVO> deliverTimes;

    public Long getVendorMemberId() {
        return vendorMemberId;
    }

    public void setVendorMemberId(Long vendorMemberId) {
        this.vendorMemberId = vendorMemberId;
    }

    public Long getVendorRoleId() {
        return vendorRoleId;
    }

    public void setVendorRoleId(Long vendorRoleId) {
        this.vendorRoleId = vendorRoleId;
    }

    public String getVendorMemberName() {
        return vendorMemberName;
    }

    public void setVendorMemberName(String vendorMemberName) {
        this.vendorMemberName = vendorMemberName;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Integer getShopType() {
        return shopType;
    }

    public void setShopType(Integer shopType) {
        this.shopType = shopType;
    }

    public Integer getShopEnvironment() {
        return shopEnvironment;
    }

    public void setShopEnvironment(Integer shopEnvironment) {
        this.shopEnvironment = shopEnvironment;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getPayChannel() {
        return payChannel;
    }

    public void setPayChannel(Integer payChannel) {
        this.payChannel = payChannel;
    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public Long getQuoteId() {
        return quoteId;
    }

    public void setQuoteId(Long quoteId) {
        this.quoteId = quoteId;
    }

    public String getQuoteNo() {
        return quoteNo;
    }

    public void setQuoteNo(String quoteNo) {
        this.quoteNo = quoteNo;
    }

    public BigDecimal getFreight() {
        return freight;
    }

    public void setFreight(BigDecimal freight) {
        this.freight = freight;
    }

    public OrderConsigneeVO getConsignee() {
        return consignee;
    }

    public void setConsignee(OrderConsigneeVO consignee) {
        this.consignee = consignee;
    }

    public OrderInvoiceVO getInvoice() {
        return invoice;
    }

    public void setInvoice(OrderInvoiceVO invoice) {
        this.invoice = invoice;
    }

    public OrderContractVO getContract() {
        return contract;
    }

    public void setContract(OrderContractVO contract) {
        this.contract = contract;
    }

    public List<BusinessOrderProductVO> getProducts() {
        return products;
    }

    public void setProducts(List<BusinessOrderProductVO> products) {
        this.products = products;
    }

    public List<BuyerOrderDeliverTimeVO> getDeliverTimes() {
        return deliverTimes;
    }

    public void setDeliverTimes(List<BuyerOrderDeliverTimeVO> deliverTimes) {
        this.deliverTimes = deliverTimes;
    }
}
